<?php
$taikhoan=$_POST["taikhoan"];
$matkhau=$_POST["matkhau"];
$lock=$_POST["lock"];
$ten=$_POST["ten"];
$ngaysinh=$_POST["ngaysinh"];
$dienthoai=$_POST["dienthoai"];
$email=$_POST["email"];
$hinh=$_FILES["hinh"]["name"];
$mota=$_POST["mota"];
$gioitinh=$_POST["gioitinh"];
require("conn.php");
$sql="INSERT INTO `ajax`.`thanh_vien` (
`username` ,
`pass` ,
`tien` ,
`lock` ,
`ten` ,
`ngaysinh` ,
`dienthoai` ,
`email` ,
`Hinh` ,
`Mota` ,
`gioitinh` ,
`ngaytrolai` 
)
VALUES (
'$taikhoan', '$matkhau', NULL , '$lock', '$ten', '$ngaysinh', '$dienthoai', '$email', '$hinh', '$mota', '$gioitinh', NULL 
)
";
if(move_uploaded_file($_FILES["hinh"]["tmp_name"],"../hinh/hinhsanpham/".$hinh))
		{
			mysql_query($sql);
			echo("thanh cong");
			header("location:index.php");
		}
		else
		{
		echo("k thanh cong");
		}
?>